home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 051-075 / disk_075 / speeddir / poster2 < prev    next >
Text File  |  1992-05-06  |  5KB  |  121 lines

  1. Article 4593 of comp.sys.amiga:
  2. Path: mcdsun!noao!hao!ames!ucbcad!ucbvax!COGSCI.BERKELEY.EDU!bryce
  3. From: bryce@COGSCI.BERKELEY.EDU (Bryce Nesbitt)
  4. Newsgroups: comp.sys.amiga
  5. Subject: Re: Faster directories under AmigaDOS
  6. Summary: Duplicate efforts -> you are not alone
  7. Message-ID: <8705131021.AA17984@cogsci.berkeley.edu>
  8. Date: 13 May 87 10:21:18 GMT
  9. Sender: daemon@ucbvax.BERKELEY.EDU
  10. Distribution: na
  11. Lines: 106
  12.  
  13. >
  14. > Shit.
  15. >
  16. > It seems like every time I come up with something resembling a useful
  17. > utility, someone else beats me to it, and comes out with something almost
  18. > the same.
  19. >
  20. > Now it's happened again.  I *WAS* going to write a program for
  21. > publication in Amazing Computing that did faster directories.  Then I found
  22. > out that Dave Haynie has been working on almost the exact same program for
  23. > the exact same magazine.  No problem, thinks I, I'll just clean it up a bit
  24. > and throw it at the Net, or RoboCity News, or something.
  25. >
  26. > Now I log in to find this gentleman has already posted a program to
  27. > help speed up directories.  It's enough to make a guy beat his head against
  28. > the keyboard.  In fact, I think I will.
  29. >
  30.           Was that your head or mine?  :-)
  31.  
  32. Well you are not alone. Here's my list:
  33. **
  34.  I wrote a icon merger, sent it off to a AmigaWorld (they like simple things
  35.  like that).  Then comes V1.2.  Yup an icon merger.
  36. **
  37.  I wrote something on the lines of MORE.  I started this AFTER V1.2 was
  38.  out, but BEFORE I got V1.2. (March 78.  Circumstances saw to it that Developers
  39.  got upgraded from Gamma 1 to Release last)
  40. **
  41.  A friend spent months working on figuring out how to open windows and create
  42.  menu strips.  Then out came 'power windows'.
  43. **
  44.  I had just finished this neat hack and was going to post it for the entire
  45.  net to see.  I called it "TrackDiskMon".  I dialed up and read the few
  46.  messages on the net.  You guessed it! TDEBUG had been posted not an hour
  47.  before. -> And who wrote that? <- Matt Dillon who lives just up the
  48.  street. 
  49.  
  50.  ----> To add injury to insult HIS WAS BETTER!  hmmph.  <---
  51.  
  52.  Well that kicked me in the right place and I dragged out some code I wrote
  53.  a long time ago when I proposed that C-A put a certain change in V1.2.
  54.  That change?  Sort by track, not hash.  The program? speeddir.
  55.  
  56.  
  57.  
  58. > Oh well, you may as well have the program to see what I did.  It
  59. > uses the AmigaDOG ACTION_GET_BLOCK packet to get raw disk blocks off the
  60. > disk and do things to them.
  61.  
  62. Speeddir was a demonstration program, unfinished.  It also works in a
  63. different way.  It patches the pr_PktWait field and intercepted any
  64. ACTION_EXAMINE_NEXT packets.  It did not re-call DOS with a GET_BLOCK
  65. but rather called trackdisk.device.  The difference is that any directory
  66. list program is faster.
  67.  
  68. > A couple of questions/comments for Bryce and Leo:
  69. >
  70. > On Bryce's "speeddir":
  71. >
  72. > As you pointed out, the drive motor for df1: does not turn off after
  73. > doing a "dir".  It *does* turn off though after doing a "copy dfd1:foo ram:",
  74. > or similar command.  Is it any "file system write" that deselects the drive,
  75. > or what?
  76.  
  77. The actual DOS filesystem gets a "ACTION_TIMER" packet every so often. It
  78. uses this to tell the trackdisk.device to turn off after several seconds.
  79.  
  80. Speeddir and DOS don't really talk to each other.  Speeddir is actually
  81. a parisite and as such can't really tell if it is safe to turn the drive
  82. off without upsetting DOS.
  83.  
  84. What *could* be done is to twoggle some bits or belch some packet 
  85. that lets the DOS filehandler
  86. know that it should get around to turning the drive off soon.
  87.  
  88. ----> This and how to access cached buffer are mysteries me <---
  89.  
  90. > Also, it is interesting that after installing speeddir, the little power
  91. > LED (not the drive LED) blinks alot when doing a "dir", or "copy" command.
  92. > Any idea what is causing that to happen?  (BTW, this is using the Manx
  93. > "ls" command for "dir", and the built-in "copy" command of shell v2.05M.)
  94.  
  95. Gee, I hope so.
  96. I said "HACKERS ONLY" and other expletives like "UNFINISHED".  What you
  97. are seeing is my handy-dandy all-purpose BLINK macro.  I just sprinkle
  98. a few BLINKS's in all my code and I know when it executes past that point.
  99. Here's BLINK:
  100.  
  101. blink        MACRO    ;XOR the power LED
  102.         move.l    d7,-(a7)
  103.         move.b    $bfe001,d7
  104.         eori.b    #2,d7
  105.         move.b    d7,$bfe001
  106.         move.l    (a7)+,d7
  107.         ENDM
  108.  
  109. This code is also significant because it was the SECOND thing I ever wrote
  110. in 68000 or on the Amiga.  The FIRST was a RTS.  (both worked fine
  111. once I got ignored the mess of $%@!* that was passed off as assembler
  112. documentation and hacked it out alone)
  113.  
  114. On BLINK per directory entry, just after it returns the packet.  It was
  115. left in to remind people that the code is unfinished, buggy, experimental,
  116. etc.
  117.  
  118. -bryce-
  119.  
  120.  
  121.